package com.yuexun.beilunpatient.ui.personaldata.model.impl;

import com.yuexun.beilunpatient.ui.bean.BaseListEntity;
import com.yuexun.beilunpatient.ui.personaldata.api.PersonalDataApi;
import com.yuexun.beilunpatient.ui.personaldata.bean.PersonalInfoBean;
import com.yuexun.beilunpatient.ui.personaldata.model.IPersonalDataModel;
import com.yuexun.beilunpatient.utils.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by chenss on 2019/6/4.
 */
public class PersonalDataModel implements IPersonalDataModel {

    private PersonalDataApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public PersonalDataApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(PersonalDataApi.class);
        }
    }

    @Override
    public Observable<BaseListEntity<PersonalInfoBean>> inquirePatientInfoByRuiRuanNew(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquirePatientInfoByRuiRuanNew(praise);
    }
}
